<!DOCTYPE html>
{%load staticfiles%}
<html lang="en">
<body>
     <div class="panel panel-default" >
  <!-- Default panel contents -->
  <div class="panel-heading">定位数据</div>
    <table class="table" id="datatable">
        <thead>
            <tr>
                <th>data</th>
            </tr>
        </thead>
        <tbody>
            {% for row in device_data %}
                <tr>
                    <td>{{ row.data }}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
     </div>
    {{ page_info.pager|safe }}
</body>
<script src="{% static 'lib/jquery/jquery.js' %}"></script>
<script>
    $(document).ready(function () {
        $('.pagebutton').click(function () {
            var getherf = $(this).attr('href');
            if(getherf ==='#'){
                return false;
            }
            else{
            $.ajax({
                url: getherf,
                type: 'GET',
                success: function (arg) {
                    $("#pstable").html(arg);
                }
            })}
        })})
        </script>
</html>